package day6;

import day1.Dog;

import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;

/**
 * @author oldliu
 * @since 1.0
 */
public class ObjWriter {
    public static void main(String[] args) {
        try {
            ObjectOutputStream oout=new ObjectOutputStream(new FileOutputStream("F:/java76/obj.txt"));
            Dog d=new Dog("大黄",100,100,"土狗");
            oout.writeObject(d);
            oout.close();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
